﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Index : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        DataProcess data = new DataProcess();

        rptnew.DataSource = data.getAllNew();
        rptnew.DataBind();

        rpthotline.DataSource = data.getAllHotline();
        rpthotline.DataBind();
        rptskype.DataSource = data.getAllHotline();
        rptskype.DataBind();
        rptadvright.DataSource = data.getAllAdvright();
        rptadvright.DataBind();
        rptadvleft.DataSource = data.getAllAdvleft();
        rptadvleft.DataBind();
        rptadvbottom.DataSource = data.getAllAdvBottom();
        rptadvbottom.DataBind();




    }

    protected void submitSearchFlight_Click(object sender, EventArgs e)
    {
        string ngaydi = depart.Value;
        string ngayve = @return.Value;
        string diemdi = hd_source.Value;
        string diemden = hd_destination.Value;
        int nguoilon =Convert.ToInt32(ddladults.Text);
        int treem =Convert.ToInt32(ddlchildren.Text);
        int sosinh =Convert.ToInt32(ddlinfants.Text);



       
        Response.Redirect("FlightList.aspx?ngaydi="+ngaydi+"&ngayve="+ngayve+"&diemdi="+diemdi+"&diemden="+diemden+"&nguoilon="+nguoilon+"&treem="+treem+"&sosinh="+sosinh+" ");

    }
}